package com.twu.biblioteca;

public class LibraryShelves {

    public static long totalUniqueBooks;
    public static long totalBooks;
    public static long totalMovies;

    public static void collectionOfBooks(Book[] books)
    {
        books[1]= new Book("TDD by example", BibliotecaApp.getTodayDate(),"Marks","TDD",1234l,1l);
        books[2]= new Book("Agile development",  BibliotecaApp.getTodayDate(),"Martain","Agile",1235l,5l);
        books[3]= new Book("Social Justice ",  BibliotecaApp.getTodayDate(),"Matler","GK",1236l,1l);
        books[4]= new Book("Logistics",  BibliotecaApp.getTodayDate(),"batman","GK",1237l,0l);

    }
    public static void collectionOfMovies(Movie[] movies) {
        movies[1] = new Movie("Sholey","Ramesh Sippy",1975,"**********");
        movies[2] = new Movie("Don 2","Farhan Akhtar",2002,"********/2");
        movies[3] = new Movie("Raanjhanaa","Anand L. Rai",2013,"**********");
        movies[4] = new Movie("Jab Tak Hai Jaan","Yash Chopra",2012,"**********");
        movies[5] = new Movie("Barfi!","Anurag Basu",2012,"********/2");
        movies[6] = new Movie("Gangs of Wasseypur","Anurag kashyap",2012,"**********");
        movies[7] = new Movie("Kahaani","Sujoy Ghosh",2012,"**********");
        movies[8] = new Movie("OMG: Oh My God!","Umesh Shukla",2012,"********/2");
        movies[9] = new Movie("Paan Singh Tomar ","Tigmanshu Dhulia",2012,"**********");
        movies[10] = new Movie("Vicky Donor"," Shoojit Sircar",2012,"**********");
        movies[11] = new Movie("Agneepath","Karan Malhotra",2012,"********/2");
        movies[12] = new Movie("English Vinglish","Gauri Sinde",2012,"**********");
        movies[13] = new Movie("Rowdy Rathore","Prabhu Deva",2012,"**********");
        movies[14] = new Movie("Dabangg 2","Arbaaz Khan",2012,"********/2");
        movies[15] = new Movie("Shanghai","Divakar Benergee",2012,"**********");

    }
    public void addBook(Book book)
    {
        totalUniqueBooks = totalUniqueBooks +1;
        totalBooks+=book.getNumberOfCopies();
    }
    public void addMovie()
    {
        totalMovies = totalMovies +1;
    }
    public void showBooks()
    {
        Book[] books=new Book[6];
        collectionOfBooks(books);
        for(int i=1;i<=4;i++)
        {
            System.out.println("["+i+"]");
            System.out.println("Title:"+books[i].getTitle());
//            System.out.println("Author:"+books[i].getAuthor());
        }
    }
    public void showMovies()
    {
        Movie[] movies=new Movie[16];
        collectionOfMovies(movies);
        System.out.println("List of movies");
        System.out.println("Movies\t"+"Year\t\t"+"Director\t\t"+"Rating");
        for(int i=1;i<=15;i++)
        {
            System.out.println(movies[i].getName()+"\t"+movies[i].getYear()+"\t"+movies[i].getDirector()+"\t"+movies[i].getRating());
        }
    }
}
